package com.kuang.springcloud.service;

import com.kuang.springcloud.pojo.Userinfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


import java.util.List;


@FeignClient(value = "SPRINGAPPLICATION-EUREKA",fallbackFactory = DeptClientServiceFallBackFactory.class)
@Component
public interface UserClientService {

    @GetMapping("/user/find")
    List<Userinfo> findAll();
    @GetMapping("/user/find/{username}")
    Userinfo getuserByUsername(@PathVariable("username") String username);


}
